<template>
  <div>
    <!-- 头部 -->
    <ShopHeader />
    <!-- 导航栏 -->
    <div class="tab">
      <div class="tab-item">
        <router-link to="/shop/goods" replace>点餐</router-link>
      </div>
      <div class="tab-item">
        <router-link to="/shop/ratings" replace>评价</router-link>
      </div>
      <div class="tab-item">
        <router-link to="/shop/info" replace>商家信息</router-link>
      </div>
    </div>
    <!-- 显示内容 -->
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
  </div>
</template>
 
<script>
import ShopHeader from "../../components/ShopHeader/ShopHeader";

export default {
  data() {
    return {};
  },
  components: {
    ShopHeader
  }
};
</script>
 
<style lang="stylus" rel="stylesheet/stylus">
@import '../../common/stylus/minxins.styl';

.tab {
  height: 40px;
  line-height: 40px;
  bottom-border-1px(rgba(7, 17, 27, 0.1));

  .tab-item {
    float: left;
    width: 33.33333%;
    text-align: center;
    font-size: 14px;
    color: rgb(77, 85, 93);

    a {
      display: block;
      position: relative;

      &.on {
        color: #02a774;

        &::after {
          content: '';
          position: absolute;
          left: 50%;
          transform: translateX(-50%);
          width: 34px;
          height: 2px;
          background: #02a774;
          bottom: 1px;
        }
      }
    }
  }
}
</style>